package com.wheat.vipcard.action;

import org.hibernate.Transaction;

import com.opensymphony.xwork2.ActionSupport;
import com.wheat.vipcard.bean.BusinessDAO;
import com.wheat.vipcard.bean.Card;
import com.wheat.vipcard.bean.CardDAO;
import com.wheat.vipcard.bean.Tabdiscount;
import com.wheat.vipcard.bean.TabdiscountDAO;

public class AddDisAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Card card;
	
	private String result;

	public Card getCard() {
		return card;
	}

	public void setCard(Card card) {
		this.card = card;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String saveVipCrad() throws Exception {
		Transaction tr = null;
		System.out.println("business =" + card);
//		try {
//			if (card != null) {
//				CardDAO dao = new CardDAO();
//				tr = dao.getSession().beginTransaction();
//				dao.save(card);
//				tr.commit();
//				dao.getSession().close();
//			}
//		} catch (Exception e) {
//			tr.rollback();
//			e.printStackTrace();
//		}
		return "saveVipCrad";
	}
}
